<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>勤工查询管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<script type="text/javascript"> //去除重复下列框
        $(function () {
            $("select").each(function (i, n) {
                var options = "";
                $(n).find("option").each(function (j, m) {
                    if (options.indexOf($(m)[0].outerHTML) == -1) {
                        options += $(m)[0].outerHTML;
                    }
                });
                $(n).html(options);
            });
        });
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jobmesmanage/stuJobSearch/">勤工查询列表</a></li>
		<shiro:hasPermission name="jobmesmanage:stuJobSearch:edit"><li><a href="${ctx}/jobmesmanage/stuJobSearch/form">勤工查询添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="stuJobSearch" action="${ctx}/jobmesmanage/stuJobSearch/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>学号：</label>
				<form:input path="stuId" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>姓名：</label>
				<form:input path="username" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>学校名称：</label>
				<form:select path="schoolId" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${stuJobs}" itemLabel="schoolName" itemValue="schoolId" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>移动电话：</label>
				<form:input path="moblie" htmlEscape="false" maxlength="200" class="input-medium"/>
			</li>
			<li><label>需求方名称：</label>
				<form:select path="joblinkid" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${stuJobs}" itemLabel="reqName" itemValue="joblinkid" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>劳酬：</label>
				<form:input path="reqPay" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>工作地址：</label>
				<form:input path="reqAddr" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>报名状态：</label>
				<form:select path="enrollStatus" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('job_auditing')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>报名时间：</label>
				<input name="beginCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					   value="<fmt:formatDate value="${stuJobSearch.beginCreateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> -
				<input name="endCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					   value="<fmt:formatDate value="${stuJobSearch.endCreateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>学号</th>
				<th>学生姓名</th>
				<th>学校名称</th>
				<th>移动电话</th>
				<th>需求方名称</th>
				<th>勤工内容</th>
				<th>岗位要求</th>
				<th>劳酬</th>
				<th>提供服利说明</th>
				<th>工作地址</th>
				<th>报名状态</th>
				<th>报名时间</th>‘
				<shiro:hasPermission name="jobmesmanage:stuJob:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="stuJobSearch">
			<tr>
				<td>
						${stuJobSearch.stuId}
				</td>
				<td>
						${stuJobSearch.username}
				</td>
				<td>
						${stuJobSearch.schoolName}
				</td>
				<td>
						${stuJobSearch.moblie}

				</td>
				<td>
						${stuJobSearch.reqName}
				</td>
				<td>
					${stuJobSearch.reqContent}
				</td>
				<td>
					${stuJobSearch.reqNeed}
				</td>
				<td>
					${stuJobSearch.reqPay}
				</td>
				<td>
					${stuJobSearch.reqStatement}
				</td>
				<td>
					${stuJobSearch.reqAddr}
				</td>
				<td>
				   ${fns:getDictLabel(stuJobSearch.enrollStatus, 'job_auditing', stuJobSearch.id)}
				</td>
				<td>
					<fmt:formatDate value="${stuJobSearch.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<shiro:hasPermission name="jobmesmanage:stuJob:edit"><td>
    				<a href="${ctx}/jobmesmanage/stuJob/form?id=${stuJobSearch.id}">修改</a>
					<a href="${ctx}/jobmesmanage/stuJobSearch/status?id=${stuJobSearch.id}" onclick="return confirmx('确认要审核？', this.href)">审核</a>
					<a href="${ctx}/jobmesmanage/stuJobSearch/delete?id=${stuJobSearch.id}" onclick="return confirmx('确认要删除该勤工报名吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>